﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Threading;
using TGVR_Report;

namespace TGVR_Project.Controllers
{
    public class TestController : Controller
    {
        //
        // GET: /Test/

        public string Index1()
        {
            System.Web.HttpContext.Current.Session["lang"] = "1";
            Thread.Sleep(10000);
            return "Index 1";
        }
        public string Index2()
        {
            System.Web.HttpContext.Current.Session["lang"] = "1";
            return "Index 2";
        }

        public ActionResult GetReport()
        {
            //IReport r = new VietJetTicket("OEQ4VN - 12111805");
            IReport r = new VietJetTicket("Q6ZWHL");
            byte[] contents = r.GetReportToBytes();
            return File(contents, "application/pdf", "Receipt.pdf");
        }

    }
}
